<%@ Control Language="C#" AutoEventWireup="true" CodeFile="editpost.ascx.cs" Inherits="forums_controls_posts_editpostl" %>
<%@ Register Src="../forums/breadcrumb.ascx" TagName="breadcrumb" TagPrefix="uc1" %>
<div>
<asp:Panel runat="server" ID="pnlThread" Width="100%">
    <asp:MultiView ID="mviewPost" runat="server">
        <asp:View ID="viewPost" runat="server">
            <uc1:breadcrumb ID="Breadcrumb1" runat="server" NavigateUrlFormat="~/forums/forum.aspx?f={0}" RootItemText="FSTDT Forums" RootItemUrl="~/forums/default.aspx" Seperator=" . " UsePostBack="false"/>
            . Edit Post
            
            <p>
            Subject:<asp:CustomValidator ID="valSubject" runat="server" ControlToValidate="txtSubject"
                    ErrorMessage="You have to have a subject." OnServerValidate="valSubject_ServerValidate"
                    ValidateEmptyText="True" ValidationGroup="EditPost"></asp:CustomValidator><br />
            <asp:TextBox runat="server" ID="txtSubject" Width="300px" ValidationGroup="EditPost" MaxLength="100" />
                </p>
            <p>
            Post:<asp:RequiredFieldValidator ID="reqFieldPost" runat="server" ControlToValidate="txtPost"
                    ErrorMessage="RequiredFieldValidator" ValidationGroup="EditPost"></asp:RequiredFieldValidator><br />
            <asp:TextBox runat="server" ID="txtPost"
                TextMode="multiLine"
                Rows="25"
                Columns="80" ValidationGroup="Edit Post" />
            </p>
            <p>
            <asp:Button runat="server" ID="btnSubmit" Text="Save" OnClick="btnSubmit_Click" ValidationGroup="EditPost" />
            <asp:Button runat="server" ID="btnDelete" Text="Delete" Visible="false" OnClick="btnDelete_Click" />
            </p>            
        </asp:View>
        <asp:View ID="viewNoThread" runat="server">
            You can't edit this post.</asp:View>
        <asp:View ID="viewDeleted" runat="server">
            <uc1:breadcrumb ID="Breadcrumb2" runat="server" NavigateUrlFormat="~/forums/forum.aspx?f={0}" RootItemText="FSTDT Forums" RootItemUrl="~/forums/default.aspx" Seperator=" . " UsePostBack="false"/>
            . Edit Post
            <p>
            Post has been successfully deleted.
            </p>
        </asp:View>
    </asp:MultiView></asp:Panel>
</div>